package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.nursing.NursingPlan;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface NursingPlanMapper {
	/**
	 * 根据条件查询护理计划列表
	 * @param nursingPlan
	 * @return
	 */
	List<NursingPlan> selectList(NursingPlan nursingPlan);
	
	/**
	 * 新增护理计划
	 * @param nursingPlan 带有主键值
	 * @return
	 */
	int insertOne(NursingPlan nursingPlan);
	
	/**
	 * 动态条件分页查询
	 * @param nursingPlan
	 * @return
	 */
	Page<NursingPlanVo> selectPage(NursingPlan nursingPlan);
	
	/**
	 * 根据逐渐查询
	 * @param id
	 * @return
	 */
	NursingPlan selectById(Long id);
	
	/**
	 * 根据主键更新
	 * @param nursingPlan
	 * @return
	 */
	int updateById(NursingPlan nursingPlan);
	
	/**
	 * 根据主键删除
	 * @param id
	 * @return
	 */
	int deleteById(Long id);

	NursingPlan getNursingPlanlist();

	void InstNursingPlan(NursingPlan nursingPlan);
	
	@Select("select * from nursing_plan where id = #{id}")
	NursingPlan cxidNationList(Integer id);

	void updataNationList(NursingPlan nursingPlan);
@Delete("DELETE from nursing_plan where id = #{id}")
	void DeleteNationList(Integer id);
	
	void updatenursingStatus(Integer id, Integer status);
}